﻿<%@ Page Language="C#" MasterPageFile="~/Home/HomePage.master" AutoEventWireup="true"
    CodeFile="MyAddress.aspx.cs" Inherits="Home_MyAddress" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Head" ContentPlaceHolderID="Head" runat="Server">
    <title>我的收货地址</title>
    <script type="text/javascript" src="/home/js/myaddress.js"></script>
    <script type="text/javascript" src="/JsBase/AppHelper/AreaHelper.js"></script>
    <script type="text/javascript">
        ModelOfUserAddress = <%=new UserAddress().ToJsonString() %>;
        SelectOptionOfProvince = '<%=SelectOptionOfProvince %>';
    </script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="Server">

   <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table2">
                  <tr  class="HeadTitle">
                  <th align="center">收货人</th>
                  <th align="center">收货地址</th>
                  <th align="center">邮编</th>
                  <th align="center">手机</th>
                  <th align="center">电话</th>
                  <th align="center" width="70">是否默认</th>
                  <th align="center" width="100">管理 <a href="javascript:Add();" class="green">[+添加]</a></th>
                  </tr>

                  <%
                      if (listOfAddress != null)
                      {
                          for (int i = 0; i < listOfAddress.Count; ++i)
                          {
                              UserAddressInfo a  = listOfAddress[i];
                   %>

                  <tr >
                  <td align="center" ><%=a.AddressInfo.ReceiverName %></td>
                  <td align="center"><%=a.Area.Province.Name %><%=a.Area.CityName %><%=a.Area.Area.AreaName %><%=a.AddressInfo.ReceiverAddress %></td>
                  <td align="center"><%=a.AddressInfo.ReceiverZipCode %></td>
                  <td align="center" class="red_bold"><%=a.AddressInfo.ReceiverMobile %></td>
                  <td align="center"><%=a.AddressInfo.ReceiverPhone %></td>
                  <td align="center" class="hui_bold"><%=a.AddressInfo.IsDefault?"默认":"" %></td>
                  <td align="center"><a href="javascript:Edit(<%=a.AddressInfo.UserAddressID %>);" class="green" title="编辑该条地址信息">编辑</a> <a href="javascript:Delete(<%=a.AddressInfo.UserAddressID %>);" class="green" title="删除此条信息">删除</a></td>
                  </tr>
                  <%}
                      }
                      else
                      { %>

          <tr>
                  <td align="center" class="pl5" colspan="6">[ 您还没有添加收货地址信息, <a href="javascript:Add();" class="red_e6">马上添加？</a>]</td>
                
              </tr>

              <%} %>

              </table>
              <br />
            
</asp:Content>
